package com.ww.springboot.boot.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2022-02-25 14:11
 */
@Component
public class ExecutorServiceConfig {

    /**
     * spring 自行实现的一个线程池
     */
    @Autowired
    private ThreadPoolTaskExecutor threadPoolTaskExecutor;


    @Bean
    public String test() {
        System.out.println(threadPoolTaskExecutor.getThreadPoolExecutor());
        return "test";
    }
}
